static void noinline init_done(void)
{
void *va;
+ unsigned long start, end;
system_state = SYS_STATE_active;
/* Destroy Xen's mappings, and reuse the pages. */
if ( using_2M_mapping() )
{
- destroy_xen_mappings((unsigned long)&__2M_init_start,
- (unsigned long)&__2M_init_end);
- init_xenheap_pages(__pa(__2M_init_start), __pa(__2M_init_end));
+ start = (unsigned long)&__2M_init_start,
+ end = (unsigned long)&__2M_init_end;
}
else
{
- destroy_xen_mappings((unsigned long)&__init_begin,
- (unsigned long)&__init_end);
- init_xenheap_pages(__pa(__init_begin), __pa(__init_end));
+ start = (unsigned long)&__init_begin;
+ end = (unsigned long)&__init_end;
}
- printk("Freed %ldkB init memory.\n", (long)(__init_end-__init_begin)>>10);
+ destroy_xen_mappings(start, end);
+ init_xenheap_pages(__pa(start), __pa(end));
+ printk("Freed %lukB init memory\n", (end - start) >> 10);
startup_cpu_idle_loop();
}
#if !defined(EFI)
. = __XEN_VIRT_START;
__image_base__ = .;
+#else
+ . = __image_base__;
#endif
+#if 0
+/*
+ * We don't really use this symbol anywhere, and the way it would get defined
+ * here would result in it having a negative (wrapped to huge positive)
+ * offset relative to the .text section. That, in turn, causes an assembler
+ * truncation warning when including all symbols in the symbol table for Live
+ * Patching code.
+ */
__2M_text_start = .; /* Start of 2M superpages, mapped RX. */
+#endif
. = __XEN_VIRT_START + MB(1);
_start = .;
*(.ctors)
__ctors_end = .;
} :text
- . = ALIGN(PAGE_SIZE);
- __init_end = .;
#ifdef EFI
. = ALIGN(MB(2));
#else
. = ALIGN(PAGE_SIZE);
#endif
+ __init_end = .;
__2M_init_end = .;
__2M_rwdata_start = .; /* Start of 2M superpages, mapped RW. */
ASSERT(kexec_reloc_size - kexec_reloc <= PAGE_SIZE, "kexec_reloc is too large")
#endif
-ASSERT(IS_ALIGNED(__2M_text_start, MB(2)), "__2M_text_start misaligned")
#ifdef EFI
ASSERT(IS_ALIGNED(__2M_text_end, MB(2)), "__2M_text_end misaligned")
ASSERT(IS_ALIGNED(__2M_rodata_start, MB(2)), "__2M_rodata_start misaligned")